package fieldgame;

import core.PlayerAbs;

public class Player extends PlayerAbs {
	protected Inventory inventory;
	private int fieldIndex;

	public Player(int numberPlayer, int startBalance) {
		super(numberPlayer);
		this.inventory = new Inventory();
		inventory.addBalance(startBalance);
	}

	public void addBalance(int fieldIndex, int modifier) {
		inventory.addBalance(modifier);
		setField(fieldIndex);
	}

	public int getBalance() {
		return inventory.getBalance();
	}

	private void setField(int fieldIndex) {
		this.fieldIndex = fieldIndex;
	}

	public void reset(int startBalance) {
		victoryState = false;
		fieldIndex = 0;
		inventory.reset(startBalance);
	}

	public int getFieldIndex() {
		return fieldIndex;
	}

}
